package org.seedltd.upms.model.sys.form;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;
import org.seedltd.core.validation.Save;
import org.seedltd.core.validation.Update;
import org.seedltd.upms.enums.EnableStatus;

import lombok.Getter;
import lombok.Setter;

/**
 *
 * 字典管理表单
 * 
 * @author laizuan
 * @version 1.0
 * @since 2021/07/24
 */
@Getter
@Setter
public class SysDictForm {

    /**
     * 主键
     */
    @NotNull(message = "修改数据ID不能为空，请重新进入操作页面。", groups = {Update.class})
    private Long dictId;

    /**
     * 字典类型
     */
    @Length(message = "字典类型长度不能超过32个字符", max = 32, groups = {Save.class})
    @NotBlank(message = "字典类型不能为空", groups = {Save.class})
    private String dictType;

    /**
     * 显示名称
     */
    @Length(message = "显示名称长度不能超过50个字符", max = 50, groups = {Save.class})
    @NotBlank(message = "显示名称不能为空", groups = {Save.class})
    private String label;

    /**
     * 前端状态类型
     */
    @Length(message = "前端状态类型长度不能超过20个字符", max = 20, groups = {Save.class})
    private String tagType;

    /**
     * 字典值
     */
    @Length(message = "字典值长度不能超过100个字符", max = 100, groups = {Save.class})
    @NotBlank(message = "字典值不能为空", groups = {Save.class})
    private String value1;

    /**
     * 字典值2
     */
    @Length(message = "字典值2长度不能超过100个字符", max = 100, groups = {Save.class})
    private String value2;

    /**
     * 字典值3
     */
    @Length(message = "字典值3长度不能超过100个字符", max = 100, groups = {Save.class})
    private String value3;

    /**
     * 字典值4
     */
    @Length(message = "字典值4长度不能超过100个字符", max = 100, groups = {Save.class})
    private String value4;

    /**
     * 字典值5
     */
    @Length(message = "字典值5长度不能超过100个字符", max = 100, groups = {Save.class})
    private String value5;

    /**
     * 排序
     */
    @NotNull(message = "排序不能为空", groups = {Save.class})
    private Integer sortNo;

    /**
     * 启用状态(1启用 0禁用)
     */
    @NotNull(message = "启用状态不能为空", groups = {Save.class})
    private EnableStatus enabled;

    /**
     * 备注
     */
    @Length(message = "备注长度不能超过100个字符", max = 100, groups = {Save.class})
    private String remark;

}
